Defining Relationships

To define a join between two tables drag from the key field in the Master (parent) table to the matching foreign key in the Transaction (child) table. In this example the Customers and Bookings tables are linked by the Person URN.

There is a one-to-many relationship between the two tables (i.e. one Customer can has between zero and many Bookings; each Booking is related to only one Customer).

Note the infinity symbol on the many end of the one-to-many relationship line.

The allowed relationships are limited by the joins supported by the FastStats database – for a full discussion see the FastStats Technical Guide.

Tip! A FastStats database can generally be represented as a tree with customers at the root and detailed transactions at the leaf nodes.

It is important that the table type is correctly specified:

  1. Master (root of the tree, only one allowed)

  2. Transaction

  3. Lookup (special type of transaction see Lookup Relationships)

To set a table as Master right click and choose Set As Master. The relationships that you define then automatically set the transaction and join tables relative to the master.

It is good practice to set a 'Default' table by right clicking on a table header and choose 'Set as Default'. Setting a default table will help the user choose the correct resolve level for their counts. The current default table can be seen in FastStats in the 'System Tables' window pane in bold.

People based licences are restrict a system to a maximum number of records in a nominated 'People' table. To set the 'People' table right-click on a table header and choose 'Set as People Table'.